package com.dxyxx.db;

import android.database.ContentObserver;
import android.os.Handler;

/**
 * 针对所有的监听写一个公有类，传入参数，Uri badgeView context，
 * 
 * @author chinesejie
 * 
 */
public class BadgeContentObserver extends ContentObserver {

	private Handler handler;

	public BadgeContentObserver(Handler handler) {
		super(handler);
		this.handler = handler;
	}

	@Override
	public boolean deliverSelfNotifications() {
		return super.deliverSelfNotifications();
	}

	@Override
	public void onChange(boolean selfChange) {
		super.onChange(selfChange);
		handler.sendEmptyMessage(0);
	}

}
